package mypackage;
import java.awt.*;
import java.awt.event.ActionListener;
public abstract class FrameDemo extends Frame implements ActionListener{
	Label label1= new Label("text 1");
	Label label2= new Label("text 2");
	Label label3= new Label("text 3");
	TextField t= new TextField(30);
	TextField t1= new TextField(10);
	TextArea ta1= new TextArea("text area",10,10);
	Button b= new Button("Press");
	Checkbox cb1= new Checkbox("option 1");
	Checkbox cb2= new Checkbox("option 2");
	Checkbox cb3= new Checkbox("option 3");
	CheckboxGroup cbg=new CheckboxGroup();
	Checkbox cb4= new Checkbox("option 1",cbg,true);
	Checkbox cb5= new Checkbox("option 2",cbg,false);
	Checkbox cb6= new Checkbox("option 3",cbg,false);
	Choice colors= new Choice();
	public FrameDemo(String title){
		super(title);
		add(label1);
		//FlowLayout exLayout=new FlowLayout(FlowLayout.CENTER);
		//setLayout(new GridLayout(4,4));
		//setLayout(new FlowLayout(FlowLayout.CENTER));
		//setLayout(exLayout);
		setLayout(new BorderLayout());
		//add(t);
		//add(label2);
		//setLayout(new FlowLayout());
		//add(t1);
		//add(label3);		
		//add(ta1);		
		//add(b);
		add(cb1,BorderLayout.NORTH);
		add(cb2,BorderLayout.SOUTH);
		add(cb3,BorderLayout.WEST);
		
		add(cb4,BorderLayout.EAST);
		add(cb5,BorderLayout.CENTER);
		//add(cb6);
		colors.addItem("Red");
		colors.addItem("Green");
		add(colors);
	}
} 
